package cn.t.keycloak.demo.custom.impl;

import cn.t.keycloak.demo.custom.ICustomSpiProvider;
import org.keycloak.models.KeycloakSession;

/**
 * 和DemoRestProvider实现RealmResourceProvider一样<br>
 * 这里实现自定义的spi provider即可
 * @author 陶敏麒
 * @date 2023/11/7 14:09
 */
public class CustomSpiImplProvider implements ICustomSpiProvider {

    private final KeycloakSession session;

    public CustomSpiImplProvider(KeycloakSession session) {
        this.session = session;
    }

    @Override
    public String sayHello(String name) {
        // 实现spi的方法
        return "this is custom spi provider say hello to " + name;
    }

    @Override
    public void close() {

    }
}
